package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"wh-1-backend/internal/model"
	"wh-1-backend/internal/model/entity"
)

type MenuTreeReq struct {
	g.Meta `path:"/admin/setting/menu/tree" tags:"menu" method:"get" summary:"菜单树"`
}
type MenuTreeRes struct {
	Tree []*model.MenuTreeItem `json:"tree"`
}

type MenuListReq struct {
	g.Meta `path:"/admin/setting/menu" tags:"menu" method:"get" summary:"菜单列表"`
	PageCommonReq
}
type MenuListRes struct {
	Total int                 `json:"total"`
	List  []*entity.AdminMenu `json:"list"`
}

type MenuCreateReq struct {
	g.Meta `path:"/admin/setting/menu" tags:"menu" method:"post" summary:"菜单创建"`
	MenuEditCommonReq
}
type MenuCreateRes struct{}

type MenuUpdateReq struct {
	g.Meta `path:"/admin/setting/menu/{Id}" tags:"menu" method:"put" summary:"菜单创建"`
	Id     uint `json:"id" in:"path" v:"min:1"`
	MenuEditCommonReq
}
type MenuUpdateRes struct{}

type MenuDeleteReq struct {
	g.Meta `path:"/admin/setting/menu/{Id}" tags:"menu" method:"delete" summary:"菜单创建"`
	Id     uint `json:"id" in:"path" v:"min:1"`
}
type MenuDeleteRes struct{}
